package com.example.demo.utils;

import java.io.Serializable;
import java.util.List;

/**
 */
public class PageUtils implements Serializable {
    private static final long serialVersionUID = 1L;
    // 总记录数
    private int totalCount;
    // 列表数据
    private List<?> rows;
    // 每页记录数
    private int pageSize;
    // 当前页数
    private int currPage;

    /**
     * 分页
     *
     * @param list
     *            列表数据
     * @param totalCount
     *            总记录数
     * @param pageSize
     *            每页记录数
     * @param currPage
     *            当前页数
     */
    public PageUtils(List<?> list, int total) {
        this.rows = list;
        this.totalCount = total;
    }

    public int getTotal() {
        return totalCount;
    }

    public void setTotal(int total) {
        this.totalCount = total;
    }

    public List<?> getRows() {
        return rows;
    }

    public void setRows(List<?> rows) {
        this.rows = rows;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getCurrPage() {
        return currPage;
    }

    public void setCurrPage(int currPage) {
        this.currPage = currPage;
    }

}